
const sum = readline();

/**
 * 
 * @param {string} sum 
 */
function main(sum) {
    const arr = [];
    for (let i = 0; i < Number(sum); i++) {
        arr.push(readline());
    }
    arr.sort();
    arr.map((item) => console.log(item))
}

main(sum)